{%include file="header.tpl"%}
<script>
//验证手机验证码是否正确
function is_ver_code(){
		var flag=1;
		$.ajax({
		type: "POST",
		async:false,
 		url: "{%$host_name%}/ajax_ver_code.php",
 		data:   {v_code:$("#ver_code").val(),mob:{%$user_mob%}},
 		dataType:'html',
 		success: function(data){
 			//验证成功
 			if(data == 1)
 			{
 				return true;
 			}else if(data == 0)
 			{
 				
 				$("#ver_code").val('');
 				flag = 0;
 			}
 		},
 		error: function(){
 			alert('系统错误')
 		}
	});
	if(flag){
		return true;
	}else{
		alert('验证码错误');
		return false;
	}
}
function resend(){
		$.ajax({
		type: "POST",
		async:false,
 		url: "{%$host_name%}/ajax_resend.php",
 		data:   {mob:{%$user_mob%},icpcode:{%$icpcode%}},
 		dataType:'html',
 		success: function(data){
 			//验证成功
 			alert(data);
 		},
 		error: function(){
 			alert('系统错误');
 		}
	});
}

function is_null(){
	if($("#ver_code").val()==''){
		alert('验证码不能为空')
		return false;
	}else{
		return true;
	}
}

</script>
<div class="nav_down"></div>
<div class="main_left">
        	<div class="main_ad"><img src="{%$pic_path%}ad.jpg" /></div>
        	<div class="frameNav">
            	<h1>02</h1>
                <span class="new"><a class="cur">无R码用户</a></span>
                <span class="old"><a href="fourth_step.php">有R码用户</a></span>
                <em>选择您的认证方式</em>
            </div>
            
            <div class="frame_c">
                <form name="form1" method="post" action="{%$host_name%}/third_step.php" onsubmit="return is_ver_code()">
            	<dl>
                	<dt>新用户认证</dt>
                    <dd>
                    	<div class="fname"><em>*</em>验证码</div>
                        <div class="finput">
                        	<input type="text" name="ver_code"  id="ver_code" value="" class="tanch_input"/>
                            <div class="zyxx">注：如果30秒手机未收到验证码，请点击"重新获取"获取新的验证码。</div>
                            <div class="hint"><a href="#" id="resend" onclick="resend()">重新获取</a></div>
                        </div>
                    </dd>
                    <dd class="fbtn">
                    	<input type="submit" value=""/>
                    </dd>
                </dl>
                </form>
            </div>
            
        </div>
       {%include file="right.tpl"%}
    </div>
    
{%include file="footer.tpl"%}
